package com.ying.tests.AAAmode.strategy2.service;

import com.alibaba.fastjson.JSONObject;
import com.ying.tests.AAAmode.strategy2.entity.BusinessLineEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.LocalDateTime;

public interface BusinessLineService {

    Logger logger = LoggerFactory.getLogger(BusinessLineService.class);

    default void processBusiness(JSONObject messageJson) {
        BusinessLineEnum businessLineEnum = businessLineEnum();
        String businessLine = businessLineEnum.getBusinessLine();
        logger.info("business name : 【{}】, process business 【startTime : {}】", businessLine, LocalDateTime.now().toString());
        getBusinessLineService(messageJson);
        logger.info("business name : 【{}】, process business 【endTime : {}】", businessLine, LocalDateTime.now().toString());
    }

    // 获取对应业务线业务
    void getBusinessLineService(JSONObject messageJson);

    // 获取对应业务线
    BusinessLineEnum businessLineEnum();

}
